package com.example.design.ddd.practice2.common;

import com.google.common.eventbus.EventBus;

/**
 * 发布事件
 */
public class DomainEventPublisher {
    private static final EventBus eventBus = new EventBus();

    public static void publish(Object event) {
        eventBus.post(event);
    }

    public static void register(Object listener) {
        eventBus.register(listener);
    }
}